package com.workerhelping.enums;

import lombok.Getter;

@Getter
public enum OperationEnum {
    APPROVE(0, "您的档案申请已被通过！"),
    REJECTION(1, "您的档案申请被拒绝！"),
    LOGOUT(2, "您的档案已被注销！"),
    DELETE(3, "您的档案已被删除！"),
    ;
    private final Integer code;
    private final String Msg;

    OperationEnum(Integer code, String msg) {
        this.code = code;
        Msg = msg;
    }

    public static String getOperationName(Integer code) {
        if (code == 0)
            return APPROVE.Msg;
        else if (code == 1)
            return REJECTION.Msg;
        else if (code == 2)
            return LOGOUT.Msg;
        else if (code == 3)
            return DELETE.Msg;
        else return null;
    }
}
